package notes.java.sjms23.t10_visitor;

// 具体元素，长方形
public class ShapeSquare implements Shape {

    
    // 基本属性，两个边长
    private double a;
    private double b;

    public ShapeSquare(double a, double b) {
        this.a = a;
        this.b = b;
    }

    @Override
    public double accept(Visitor visitor) {
        return visitor.ofShap(this);
    }

    
    public double getA() {
        return a;
    }

    
    public void setA(double a) {
        this.a = a;
    }

    
    public double getB() {
        return b;
    }

    
    public void setB(double b) {
        this.b = b;
    }

    
}
